
.layout {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 4px var(--shadow-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 48px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.logo-icon {
  font-size: 28px;
  color: #ff6b6b;
}

.logo-text {
  font-size: 22px;
  font-weight: bold;
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
   background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-item {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s;
}

.nav-item:hover {
  color: #ff6b6b;
  background: var(--hover-bg);
}

.nav-item.active {
  color: #ff6b6b;
  font-weight: 500;
  background: rgba(255, 107, 107, 0.1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  width: 320px;
}

.search-input :deep(.el-input__wrapper) {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.login-btn, .register-btn {
  height: 36px;
  border-radius: 18px;
}

.login-btn {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
}

.login-btn:hover {
  background-color: #ff8e8e;
  border-color: #ff8e8e;
}

.register-btn {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.register-btn:hover {
  color: #ff8e8e;
  border-color: #ff8e8e;
  background-color: rgba(255, 107, 107, 0.1);
}

.main-content {
  padding-top: 64px;
  min-height: calc(100vh - 64px);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

/* 过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* 在已有的样式后添加 */
.upload-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--bg-secondary);
}

.upload-trigger-small {
  padding: 12px 20px;
  flex-direction: row;
  gap: 12px;
}

.upload-icon {
  font-size: 48px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  transition: all 0.3s;
}

.upload-icon-small {
  font-size: 24px;
  margin-bottom: 0;
}

.upload-filename {
  font-size: 14px;
  color: var(--el-text-color-regular);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.upload-text {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.upload-tip {
  font-size: 12px;
  color: var(--text-secondary);
}

.upload-progress {
  margin: 20px 0;
}

:deep(.el-upload) {
  width: 100%;
}

:deep(.el-upload-dragger) {
  width: 100%;
}

.thumbnail-upload {
  width: 100%;
}

.thumbnail-options {
  display: flex;
  align-items: center;
  gap: 16px;
}

.thumbnail-preview {
  position: relative;
  width: 240px;
  height: 135px;
  border-radius: 8px;
  overflow: hidden;
}

.thumbnail-preview .el-image {
  width: 100%;
  height: 100%;
}

.thumbnail-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.thumbnail-preview:hover .thumbnail-actions {
  opacity: 1;
}

.video-capture {
  display: flex;
  gap: 20px;
}

.capture-preview {
  flex: 1;
}

.capture-video {
  width: 100%;
  max-height: 450px;
  border-radius: 8px;
  background: #000;
}

.editor-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor-canvas {
  width: 100%;
  background: #000;
  border-radius: 8px;
}

.editor-tools {
  padding: 16px;
  background: var(--el-fill-color-light);
  border-radius: 8px;
}

.text-editor-panel,
.filter-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--el-fill-color-lighter);
  border-radius: 8px;
}

.text-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.filter-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.video-preview {
  margin: 20px 0;
}

.preview-video {
  width: 100%;
  max-height: 400px;
  border-radius: 8px;
}

.thumbnail-controls {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.thumbnail-section {
  width: 100%;
}

.thumbnail-preview {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16/9;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

.thumbnail-image {
  width: 100%;
  height: 100%;
}

.thumbnail-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.thumbnail-preview:hover .thumbnail-actions {
  opacity: 1;
}

.text-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-panel {
  padding: 16px;
}

.filter-item {
  margin-bottom: 20px;
}

.filter-item span {
  display: block;
  margin-bottom: 8px;
}

.editor-canvas {
  position: absolute;
  left: -9999px;
}

/* 在已有样式后添加 */
.thumbnail-uploader {
  width: 100%;
}

.thumbnail-preview {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16/9;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.thumbnail-preview:hover .thumbnail-actions {
  opacity: 1;
}

/* 在已有样式中添加 */
.thumbnail-upload-section {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.upload-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--bg-secondary);
}

.upload-trigger:hover {
  border-color: var(--el-color-primary);
  background: var(--hover-bg);
}

.upload-icon {
  font-size: 48px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.upload-text {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.upload-tip {
  font-size: 12px;
  color: var(--text-secondary);
}

.thumbnail-tip {
  margin-top: 20px;
  text-align: center;
}

.el-divider {
  margin: 16px 0;
}

/* 添加新的样式 */
.thumbnail-editor {
  display: flex;
  gap: 20px;
  height: 500px;
  background: var(--bg-primary);
}

.editor-main {
  flex: 1;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editing-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.editor-sidebar {
  width: 300px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 16px;
}

.adjustment-group {
  padding: 16px 0;
}

.adjustment-item {
  margin-bottom: 20px;
}

.adjustment-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* 添加新的样式 */
.editor-canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-layers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.text-layer {
  position: absolute;
  cursor: move;
  pointer-events: auto;
  user-select: none;
  white-space: nowrap;
  padding: 4px;
  border-radius: 4px;
}

.text-layer.active {
  outline: 2px solid #00ff00;
  background: rgba(0, 255, 0, 0.1);
}

.delete-text-btn {
  position: absolute;
  top: -20px;
  right: -20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.text-layer:hover .delete-text-btn {
  opacity: 1;
}

/* 添加新的样式 */
.edit-text-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* 修改字选择相关样式 */
:deep(.font-select-dropdown) {
  .el-select-dropdown__wrap {
    max-height: 300px;
  }

  .el-select-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }

  .el-select-group__title {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--el-text-color-secondary);
    background: var(--el-fill-color-light);
  }

  .el-select-group__wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0 !important;
  }

  .el-select-dropdown__item {
    width: calc(33.33% - 8px);
    padding: 8px 12px;
    font-size: 14px;
    text-align: center;
    border-radius: 4px;
    margin: 0;
    
    &:hover {
      background-color: var(--el-fill-color-light);
    }
    
    &.selected {
      font-weight: normal;
      color: var(--el-color-primary);
      background-color: var(--el-color-primary-light-9);
    }

    span {
      display: block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
}

.text-preview {
  margin-top: 8px;
  padding: 8px;
  border-radius: 4px;
  background: var(--el-fill-color-light);
  text-align: center;
  font-size: 16px;
}

/* 添加图标和文字的样式 */
.nav-item .el-icon,
.nav-item .custom-icon {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.nav-item span {
  display: inline-block;
  vertical-align: middle;
}

/* 自定义图标的样式 */
.custom-icon {
  display: inline-block;
  vertical-align: middle;
}

/* 上传对话框相关样式 */
:deep(.el-dialog) {
  background: var(--bg-primary);
}

:deep(.el-dialog__title) {
  color: var(--text-primary);
}

:deep(.el-form-item__label) {
  color: var(--text-primary);
}
